namespace DivelReader
{
    // To be bindable, a class must be defined within a namespace
    // and a bindable attribute needs to be applied.
    // A FeedItem represents a single blog post.
    [Windows::UI::Xaml::Data::Bindable]
    public ref class FeedItem sealed
    {
    public:
        FeedItem(void){}

        property Platform::String^ Title;
        property Platform::String^ Author;
        property Platform::String^ Content;      
        property Windows::Foundation::DateTime PubDate;      
        property Windows::Foundation::Uri^ Link;

    private:
        ~FeedItem(void){}
    };

    // A FeedData object represents a feed that contains 
    // one or more FeedItems. 
    [Windows::UI::Xaml::Data::Bindable]
    public ref class FeedData sealed
    {
    public:
        FeedData(void)
        {
            m_items = ref new Platform::Collections::Vector<FeedItem^>();
        }

        // The public members must be Windows Runtime types so that
        // the XAML controls can bind to them from a separate .winmd.
        property Platform::String^ Title;            
        property Windows::Foundation::Collections::IVector<FeedItem^>^ Items
        {
            Windows::Foundation::Collections::IVector<FeedItem^>^ get() {return m_items; }
        }

        property Platform::String^ Description;
        property Windows::Foundation::DateTime PubDate;

    private:
        ~FeedData(void){}

        Platform::Collections::Vector<FeedItem^>^ m_items;
    };   

}